-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor libraries handling, add handling of descriptors from different sources #89
Conversation
6948c60
to
9dec2e5
Compare
b1a5abc
to
5d984d9
Compare
// Load library descriptor from a remote URL | ||
%use herlib@url[https://site.com/lib.json] | ||
// You may omit library name for file and URL resolution: | ||
%use @file[lib.json] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, the path is relative. Is it relative to the current notebook scope or to notebook parent directory? I think that the later is preferred since one can ship descriptors alongside the notebook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's relative to current working directory, which is the directory from where you start your jupyter client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense if it would be relative to the notebook file. This way it won't matter where you start the notebook. I mean to use resolveSibling
instead of resolve
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I can figure out from this SO answer it's impossible to obtain the notebook path without extending the messaging protocol :( Regarding your offer about resolution against parent directory, I think it's a bit unnatural: can't really figure out the case. Anyway, you may go to the parent directory via ..
, and it will work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK then. My idea was to be able to put descriptor in the same directory as the notebook itself and do not think about where do you start notebook from, but it is not so important to waste effort.
656989e
to
6612be5
Compare
from different sources. Fixes #70 Also, get rid of several singletons in config and replaced them with factory and free functions.
6612be5
to
f8ff3c3
Compare
Also, get rid of several singletons in config and replaced
them with factory and free functions.
Fixes #70